#include <boost/numeric/ublas/vector_proxy.hpp>
#include <boost/numeric/ublas/triangular.hpp>
#include <boost/numeric/ublas/lu.hpp>

#ifndef _OSMatrix_
#define _OSMatrix_

typedef boost::numeric::ublas::matrix<OS_double> OSMatrix;

template <class Array>
const Array operator*(const Array&, const Matrix& m)
{
        OS_REQUIRE(v.size() == m.rows());
        Array result(m.columns());
        for (Size i=0; i<result.size(); i++)
            result[i] =
                std::inner_product(v.begin(),v.end(),
                                   m.column_begin(i),0.0);
        return result;
};

template <class Array>
const Array operator*(const Matrix&, const Array&) {
        OS_REQUIRE(v.size() == m.columns());
        Array result(m.rows());
        for (Size i=0; i<result.size(); i++)
            result[i] =
                std::inner_product(v.begin(),v.end(),m.row_begin(i),0.0);
        return result;
};

#endif
